<template>
	<view class="content">
		<view class="statusBox"></view>
		<view class="Titles" :class="titleType==1 ? 'title_black':''">
			<image class="iconBack" src="/static/index/icon_back2.png" mode="" v-if="titleType == 0" @tap="btnBack"></image>
			<image class="iconBack" src="/static/index/icon_back.png" mode=""  v-if="titleType == 1" @tap="btnBack"></image>
			<view class="name textCenter" :class="titleType==1 ? 'title_black':''">商品详情</view>
		</view>
		<uni-swiper-dot class="swiper" :info="bannerList" :current="current" mode="nav" :dotsStyles="dotsStyles">
			<swiper class="swiper-box swiper" @change="change" autoplay="autoplay" circular="true">  
				<swiper-item v-for="(item, indexc) in bannerList" :key="indexc"  @tap="tapBanner(item.type,item.video)">
					<image class="swiperitem banner"  :src="item.src"/>
					<view class="iconCenterBox" v-if="item.type==1" @tap="showVideoShadow = true">
						<!-- <image class="videoPlay"  src="/static/index/details/icon_play.png"/> -->
						<image class="videoPlay"  src="/pages_index/static/details/icon_play.png"/>
					</view>
				</swiper-item>
			</swiper>
		</uni-swiper-dot>
		<view class="noticeBox" v-show="noticeMsg.length !== 0">
			<an-notice-bar :msg="noticeMsg" :switchTime="2"></an-notice-bar>
		</view>
		
		
		<!-- <view class="priceBoxes">
			<view class="iconMoney fontSemiBold">¥</view>
			<view class="price fontSemiBold">{{datas.price}}</view>
			<view class="userPrice" v-show="datas.vip == 1">
				<view class="user">会员价</view>
				<view class="userIcon fontSemiBold"		 v-show="datas.userPrice">¥</view>
				<view class="userPrices fontSemiBold"	 v-show="datas.userPrice">{{datas.userPrice}}</view>
			</view>
			<s class="beforePrice">¥{{datas.beforePrice}}</s>
			<image class="iconShare" src="/static/index/details/icon_share.png" mode=""  @tap="showHideBox = true"></image>
			<view class="clearBoth"></view>
		</view> -->
		<view class="priceBoxes">
			<view class="priceBg">
				<view class="priceBgIcon fontSemiBold">¥</view>
				<view class="priceBgprice fontSemiBold">{{datas.price}}</view>
				<s class="priceBgbeforeprice fontSemiBold">¥{{datas.beforePrice}}</s>
				<view class="clearBoth"></view>
			</view>
			<view class="priceTime">
				<view class="priceName">距结束还剩</view>
				<view class="priceNumber" v-if="datas.timeShow">{{datas.time}}</view>
			</view>
		</view>
		
		<view class="clearBoth"></view>
		
		<view class="titleBox marginLeft2">
			<view class="title overflow_two">{{datas.title}}</view>
			<view class="describe overflow_two">{{datas.describe}}</view>
		</view>
		
		<view class="ticketSingle marginLeft2" @tap="showTicketList = true" v-show=" ticketList.length !== 0 ">
			<view class="ticketName">领券</view>
			<view class="single">券</view>
			<!-- <view class="ticketNames">{{ticketList[0].price}}元无门槛{{ticketList[0].type}}券</view> -->
			<view class="ticketNames" v-show=" ticketListSingle.useMoney == 0 " >{{ticketListSingle.price}}元无门槛券</view>
			<view class="ticketNames" v-show=" ticketListSingle.useMoney !== 0 ">满{{ticketListSingle.useMoney}}元减{{ticketListSingle.price}}元券</view>
			<uni-icons class="icon" type="arrowright" color="rgb(187,187,187)" size="16" @tap=""/>
		</view>
		<view class="clearBoth"></view>

		<view class="goodsPlace overflow_one">
			<view class="goodsBox overflow_one">
				<view class="goods" v-for="(item_goods,index_goods) in goodsData" :key="index_goods"><view class="icon" v-if="index_goods!==0">·</view>{{item_goods.name}}</view>
			</view>
			<uni-icons class="icons" type="arrowright" color="rgb(187,187,187)" size="16" @tap=""/>
		</view>
		
		<view class="clearBoth"></view>
		<view class="splite"></view>

		<view class="goDutch" v-if="goDutchNumber !== 0">
			<view class="title">{{goDutchNumber}}人正在拼单，可直接参与</view>
			<view class="goDutchUserBox" v-for="(item_Dutch,index_Dutch) in dutchList" :key="index_Dutch" v-if="item_Dutch.show">
				<image class="headImage" :src="item_Dutch.headImage" mode=""></image>
				<view class="name overflow_one">{{item_Dutch.name}}</view>
				<view class="lessTime">
					<view class="lessPeople">还差{{item_Dutch.lessPeople}}人拼成</view>
					<view class="lessTime">剩余{{item_Dutch.lessTime}}</view>
				</view>
				<view class="btnGoDutch" @tap="btnTeam(item_Dutch)">去拼单</view>
			</view>
		</view>
		
		<view class="clearBoth"></view>
		<view class="splite"></view>
		
		<view class="storeBox">
			<image class="storeImage" :src="store.headImage" mode=""></image>
			<view class="right">
				<view class="name overflow_one">{{store.name}}</view>
				<image class="vipImage" src="/static/index/details/icon_1.png" mode="" v-if="store.type==1"></image>
				<view class="numbers">在售商品{{store.sell}}件 月销{{store.monthSell}}件</view>
			</view>
			<view class="btnInStore" @tap="btnStore">进店逛逛</view>
			<view class="clearBoth"></view>
		</view>
		
		<view class="typeBox">
			<view class="typeScroll" :style="{width:typeScrollWidth}">
				<view class="typeRow" v-for="(item,index) in typeList" :key="index" @tap="inDetails(item.id)">
					<image class="sellImage" :src="item.image" mode=""></image>
					<view class="title overflow_two">{{item.name}}</view>
					<view class="price">
						<view class="icon">¥</view>
						<view class="priceNumber">{{item.price}}</view>
					</view>
				</view>
				<view class="clearBoth"></view>
			</view>
		</view>
		
		<view class="clearBoth"></view>
		<view class="splite"></view>
		
		<view class="parameter" v-show="parameterList.length!==0">
			<view class="title">商品参数</view>
			<view class="parameterBox" v-for="(item,index) in parameterList" :key="index">
				<view class="left  overflow_one">{{item.left}}</view>
				<view class="right overflow_one">{{item.right}}</view>
				<view class="clearBoth"></view>
			</view>
		</view>
		
		<view class="clearBoth"></view>
		<view class="splite"></view>
		
		<view class="detailsBox">
			<view class="title">图文详情</view>
			<view class="detailsContent html" v-html="datas.content"></view>
		</view>
		
		<view class="clearBoth"></view>
		<view class="splite"></view>
		
		<view class="other">
			<view class="titleBox">
				<image class="icon" src="pages_index/static/details/icon_2.png" mode=""></image>
				<view class="name">相似商品</view>
				<image class="icon" src="/pages_index/static/details/icon_2.png" mode=""></image>
			</view>
			<view class="proList">
				<view class="proRows" v-for="(item,index) in rowsList" :key="index" @tap="inDetails(item.id)">
					<image class="cover" :src="item.cover" mode=""></image>
					<view class="HisTitle fontSize14 overflow_two">{{item.title}}</view>
					<!-- <view class="typeBoxs">
						<view class="type" v-for="(items,indexs) in item.type" :key="indexs">{{items.name}}</view>
					</view> -->
					<view class="clearBoth"></view>
					<view class="priceBox">
						<view class="price">¥<view class="priceTip">{{item.price}}</view></view>
						<s class="priceBefore">¥ {{item.priceBefore}}</s>
						<view class="user">已拼{{item.use}}件</view>
						<view class="clearBoth"></view>
					</view>
				</view>
			</view>
		</view>
		
		<view class="footer">
			<view class="imageBox">
				<!-- <image class="icon" src="/static/index/details/icon_3.png" mode="" @tap="btnStore"></image> -->
				<image class="icon" src="/static/index/details/icon_4.png"  mode="" @tap="btnCol" v-if="isCol==false"></image>
				<image class="icon" src="/static/index/details/icon_44.png" mode="" @tap="btnCol" v-if="isCol==true"></image>
				<image class="icon" src="/static/index/details/icon_5.png"  mode="" @tap="btnTel"></image>
				<!-- <image class="icon" src="/static/tabbar/shopcar1.png" mode="" @tap="btnSure(2)"></image> -->
			</view>
			<!-- <view class="buyBox bg_orange">
				<view class="pingNow">
					<view class="priceIcons_footer">¥</view>
					<view class="price_footer">123</view>
				</view>
				<view class="clearBoth"></view>
				<view class="names">发起拼团</view>
			</view>
			<view class="buyBox bg_blue">
				<view class="pingNow">
					<view class="priceIcons_footer">¥</view>
					<view class="price_footer">123</view>
				</view>
				<view class="clearBoth"></view>
				<view class="names">单独购买</view>
			</view> -->
			<!-- <view class="buyBox bg_orange" @tap="btnSure(1)">
				<view class="nameSingle">立即购买</view>
			</view>
			<view class="buyBox bg_blue" @tap="btnSure(2)">@tap="addShoppingCar"
				<view class="nameSingle">加入购物车</view>
			</view> -->
			<view class="buyBox bg_orange" @tap="btnSure(3)">
				<view class="nameSingle">发起拼团</view>
			</view>
			<view class="buyBox bg_blue" @tap="btnSure(1)">
				<view class="nameSingle">单独购买</view>
			</view>
		</view>
		
		<view class="hideBox" v-if="showHideBox">
			<view class="bg_grey" @tap="showHideBox = false"></view>
			<view class="bg_white">
				<button class="iconBox btnsCss" open-type="share">
					<image class="icon" src="/static/index/details/icon_friend.png" mode=""></image>
					<view class="iconName fontSize14">微信好友</view>
				</button>
				<button class="iconBox" @tap="tapBePoster">
					<image class="icon" src="/static/index/details/icon_poster.png" mode=""></image>
					<view class="iconName fontSize14">分享图片</view>
				</button>
				<view class="clearBoth"></view>
				<view class="falses"  @tap="showHideBox = false">取消</view>
			</view>
		</view>
		<view class="ticketGrey" @tap="showTicketList = false" v-if="showTicketList"></view>
		<view class="ticketBox" v-if="showTicketList">
			<view class="title">当前优惠</view>
			<view class="ticketScrollBox">
				<view class="ticketList" v-for="(item,index) in ticketList" :key="index">
					<view class="priceBoxs">
						<view class="ticketPrice fontSemiBold">{{item.price}}</view>
						<view class="priceName">优惠券(元)</view>
					</view>
					<view class="ticketNameBox">
						<view class="ticketTitle" v-show="item.type == 1">平台优惠券</view>
						<view class="ticketTitle" v-show="item.type == 2">商品优惠券</view>
						<view class="ticketTitle" v-show="item.type == 3">分类优惠券</view>
						<view class="ticketUseTime">有效期:{{item.useTime}}</view>
						<view class="useWay" v-show="item.useMoney == 0">无门槛使用</view>
						<view class="useWay" v-show="item.useMoney !== 0">满{{item.useMoney}}元减{{item.price}}元</view>
					</view>
					<view class="ticketLineCenter">
						<view class="getTicketBtn" @tap="getTicketNow(item.id)">立即领取</view>
					</view>
					<view class="clearBoth"></view>
				</view>
			</view>
			<view class="closeTicket" @tap="showTicketList = false">关闭</view>
		</view>
		<view class="teamBuyBox" v-if="showTeamBuy&&teamBuyList.show">
			<view class="team_grey"></view>
			<view class="team_white">
				<image class="closeIcon" src="/static/index/details/icon_close.png" mode="" @tap="showTeamBuy = false"></image>
				<view class="team_title overflow_one">参与 {{teamBuyList.name}} 的拼单</view>
				<view class="team_less">仅剩 <view class="color_orange">{{teamBuyList.lessNumber}}</view> 个名额，{{teamBuyList.lessTime}}后结束</view>
				<view class="teamBuyHeadImageBox">
					<image class="teamBuyHeadImage" :src="teamBuyList.headImage" mode=""></image>
					<view class="teamBuyName">拼主</view>
				</view>
				<view class="teamBuyHeadImageBox">
					<image class="teamBuyHeadImage" src="/static/index/details/icon_somebody.png" mode=""></image>
				</view>
				<view class="clearBoth"></view>
				<view class="addTeamBuy" @tap="btnSure(3)">参与拼单</view>
			</view>
		</view>
		<view class="ruleBox" v-if="showBuyShadow">
			<view class="ruleGrey"></view>
			<view class="goodsBox">
				<image class="goodsBoxCloseIcon" src="/static/index/details/icon_close2.png" mode="" @tap="showBuyShadow=false"></image>
				<image class="goodsImage" :src="buyList.cover" mode=""></image>
				<view class="goodsRight">
					<view class="moneyIcon fontSemiBold">¥</view>
					<view class="goodsPrice fontSemiBold">{{buyList.price}}</view>
					<view class="clearBoth"></view>
					<view class="lessNumber">库存{{buyList.number}}件</view>
					<view class="clearBoth"></view>
					<view class="ruleName">请选择 规格</view>
					<view class="clearBoth"></view>
				</view>
				<view class="clearBoth"></view>
				<view class="ruleScroll">
					<view class="ruleRows" v-for="(item,index) in buyList.list" :key="index">
						<view class="ruleTitle">{{item.title}}</view>
						<view class="ruleRows_more" :class="items.isThis?'ruleRows_this':'' " v-for="(items,indexs) in item.rule" :key="indexs" @tap="thisRule(items.id,index,indexs)">{{items.rules}}</view>
						<view class="clearBoth"></view>
					</view>
				</view>
				<view class="clearBoth"></view>
				<view class="buyNumberBox">
					<view class="numberNameBox">
						<view class="numberName">购买数量</view>
						<view class="numberNames" v-show="buyList.maxNumber">（每人限购{{buyList.maxNumber}}件）</view>
						<view class="clearBoth"></view>
					</view>
					<view class="numberCompute">
						<view  class="addCompute" @tap="computBuyNumber(0)">-</view>
						<!-- <input class="buyNumbers" maxlength="3" type="number" :value="buyList.buyNumber" v-model="buyList.buyNumber"> -->
						<input class="buyNumbers" maxlength="3" type="number" v-model="buyList.buyNumber">
						<view  class="addCompute" @tap="computBuyNumber(1)">+</view>
					</view>
				</view>
				<view class="clearBoth"></view>
				<view class="sureBuy" @tap="sureBtn">确定</view>
			</view>
		</view>
		<view class="videoBox" v-if="datas.showVideoBox" @tap="datas.showVideoBox = false">
			<!-- <view class="video_grey"></view> -->
			<video class="videos" :src="datas.videoSrc"></video>
		</view>

	</view>
</template>
<style>
	.content{padding-bottom: 120upx;}
	.content .statusBox{margin-bottom: 52upx;}
	.content .splite{width: 100%;height:16upx;background: #F5F5F9;}
	.content .noticeBox{width:370upx;height:60upx;line-height: 60upx;position: absolute;top:200upx;left:5%;background:rgba(0,0,0,0.4);border-radius: 100upx;}
	.content .Titles{width: 100%;height:64upx;position: fixed;top:110upx;left: 0;z-index: 7;}
	.content .Titles .iconBack{width: 24upx;height:40upx;position: absolute;left:5%;top:10upx}
	.content .Titles .name{height:60upx;line-height: 60upx;font-size: 40upx;font-weight: bold;color:white}
	.content .title_black{background:white;color:black !important;transition: all 0.5s;}
	.content .swiper{width:100%;height:750upx;margin-top: 5upx;overflow: hidden;}
	.content .swiper .iconSwiper{height:750upx;display: flex;justify-content:space-around;flex-wrap: wrap;}
	.content .swiper .swiperitem{width: 100%;height:750upx;}
	.content .swiper .iconList{width: 20%;height:130upx;display: flex;justify-content:center;flex-wrap: wrap;}
	.content .swiper .biggerIcon{width: 80upx;height:80upx;}
	.content .swiper .lessIcon{width: 52upx;height:52upx;margin:0 10upx;}
	.content .swiper .iconCenterBox{width:100%;height:750upx;display:flex;justify-content: center;align-items: center;position: absolute;top:0;left:0;z-index: 2;}
	.content .swiper .videoPlay{width: 120upx;height:120upx}
	
	.content .priceBoxes{width: 100%;height: 120upx;line-height: 120upx;margin:20upx 0;}
	.content .priceBoxes .priceBg{width:65%;float: left;background-image: url(../../static/seckill/icon_2.png);background-size: 100% 100%;background-repeat: no-repeat;}
	.content .priceBoxes .priceBg .priceBgIcon{font-size: 72upx;color:white;float: left;margin-left: 5%;}
	.content .priceBoxes .priceBg .priceBgprice{font-size: 72upx;color:white;float: left;}
	.content .priceBoxes .priceBg .priceBgbeforeprice{height:120upx;line-height: 140upx;font-size: 30upx;color:white;float: left;margin-left: 5%;}
	.content .priceBoxes .priceTime{width:35%;height: 120upx;float: right;display: flex;justify-content: center;flex-wrap: wrap;align-items: center;}
	.content .priceBoxes .priceTime .priceName{width: 100%;height: 60upx;line-height:60upx;text-align:center;font-size: 26upx;color:#262626;}
	.content .priceBoxes .priceTime .priceNumber{width: 100%;height: 60upx;line-height:60upx;text-align:center;font-size: 32upx;color:#DC582A;font-weight: bold;}
	
	.content .titleBox{width: 95%;}
	.content .titleBox .title{width: 100%;font-weight: bold;font-size: 36upx;}
	.content .titleBox .describe{width: 100%;font-size: 26upx;margin:20upx 0 40upx 0;color:#BBBBBB}
	.content .ticketSingle{width: 95%;}
	.content .ticketSingle .ticketName{float: left;font-size: 26upx;color:white;background: rgb(220,88,42);;border-radius: 10upx;padding:10upx 15upx;}
	.content .ticketSingle .single{padding:8upx 15upx;float: left;font-size: 26upx;color:rgb(220,88,42);margin-left:10upx;border:2upx solid rgb(220,88,42);border-radius: 10upx;border-right:2upx dashed rgb(220,88,42);}
	.content .ticketSingle .ticketNames{padding:8upx 10upx;float: left;font-size: 26upx;color:rgb(220,88,42);border:2upx solid rgb(220,88,42);border-left:none;border-radius: 10upx}
	.content .ticketSingle .icon{float: right;margin-top: 10upx;}
	.content .goodsPlace{width: 95%;padding-top: 30upx;margin:30upx 0;margin-left: 2.5%;border-top: 2upx solid #DDDDDD;}
	.content .goodsPlace .goodsBox{width: 90%;height:40upx;line-height: 40upx;float: left;}
	.content .goodsPlace .goods{height:40upx;line-height: 40upx;font-size: 28upx;color:#333333;float: left;}
	.content .goodsPlace .icon{font-size: 28upx;color:#333333;float: left;margin:0 20upx}
	.content .goodsPlace .icons{float: right;}
	.content .goDutch{width: 95%;margin:40upx 0 40upx 2.5%;}
	.content .goDutch .title{width: 100%;font-size:32upx;color:#262626;font-weight:bold;}
	.content .goDutch .goDutchUserBox{width: 100%;margin-top:40upx;height: 60upx;line-height: 60upx;}
	.content .goDutch .goDutchUserBox .headImage{width: 60upx;height: 60upx;float: left;margin-right: 1.5%;}
	.content .goDutch .goDutchUserBox .name{width: 25%;float: left;margin-right: 2.5%;color:#262626}
	.content .goDutch .goDutchUserBox .lessTime{width: 45%;background: rgb(245,245,249);float: left;color:#666666;border-radius: 200upx;}
	.content .goDutch .goDutchUserBox .lessTime .lessPeople{font-size: 24upx;float: left;}
	.content .goDutch .goDutchUserBox .lessTime .lessTime{font-size: 24upx;float: left;margin-left: 10upx;}
	.content .goDutch .goDutchUserBox .btnGoDutch{font-size: 24upx;color:white;background: rgb(220,88,42);border-radius: 100upx;float: right;padding:0 15upx}
	.content .storeBox{width: 95%;margin:40upx 0;margin-left: 2.5%;}
	.content .storeBox .storeImage{width: 100upx;height: 100upx;float: left;margin-right: 5%;}
	.content .storeBox .right{width: 60%;float: left;overflow: hidden;}
	.content .storeBox .right .name{max-width:80%;font-weight: bold;color:#30313B;font-size: 36upx;float: left;}
	.content .storeBox .right .vipImage{width: 36upx;height:32upx;float: left;margin-left: 5%;margin-top: 5upx;}
	.content .storeBox .right .numbers{width: 100%;color:#BBBBBB;font-size: 24upx;float: left;margin-top: 20upx;}
	.content .storeBox .btnInStore{float: right;height:50upx;line-height: 50upx;margin-top:25upx;color:#DC582A;background:rgb(251,238,233);border-radius: 10upx;padding:0 10upx}
	.content .typeBox{width: 95%;margin:40upx 0;margin-left: 2.5%;overflow-x: scroll;}
	.content .typeBox .typeScroll{width:auto;overflow-x: scroll;}
	.content .typeBox .typeScroll .typeRow{width: 200upx;margin-right:20upx;float: left;}
	.content .typeBox .typeScroll .typeRow .sellImage{width:200upx;height:200upx;border-radius: 10upx;}
	.content .typeBox .typeScroll .typeRow .title{height:64upx;color:#262626;font-weight: bold;font-size: 24upx;}
	.content .typeBox .typeScroll .typeRow .price{margin-top: 10upx;}
	.content .typeBox .typeScroll .typeRow .price .icon{font-weight: bold;color:#DC582A;font-size: 24upx;float:left;}
	.content .typeBox .typeScroll .typeRow .price .priceNumber{font-weight: bold;color:#DC582A;font-size: 28upx;float:left;margin-left:5upx;}
	.content .parameter{width: 95%;margin:20upx 0;margin-left:2.5%;}
	.content .parameter .title{font-weight: bold;color:#30313B;font-size: 36upx;margin-bottom: 20upx;}
	.content .parameter .parameterBox{width: 100%;margin-top: 20upx;}
	.content .parameter .parameterBox .left{width: 25%;margin-right: 5%;float: left;color:#BBBBBB;text-align: right;}
	.content .parameter .parameterBox .right{width: 70%;float: left;text-align: left;color:#30313B;}
	.content .detailsBox{width: 95%;margin:20upx 0;margin-left:2.5%;}
	.content .detailsBox .title{font-weight: bold;color:#30313B;font-size: 36upx;margin-bottom: 20upx;}
	.content .other{width: 100%;background: rgb(245,245,249);padding-top: 40upx;}
	.content .other .titleBox{width: 100%;display: flex;justify-content: center;}
	.content .other .titleBox .icon{width: 32upx;height:20upx;margin:0 30upx;margin-top: 15upx;}
	.content .other .titleBox .name{height: 50upx;line-height: 50upx;color:#30313B;font-weight: bold;font-size: 36upx;}
	.content .proList{width: 90%;margin-left: 5%;display: flex;justify-content:space-between;flex-wrap: wrap;}
	.content .proList .proRows{width:47.5%;margin:15upx 0;background: white;border-radius: 10upx;padding-bottom: 10upx;}
	.content .proList .proRows .cover{width: 100%;height:336upx;border-radius: 10upx;}
	.content .proList .proRows .HisTitle{font-weight: bold;margin-left: 5%;height:76upx}
	.content .proList .proRows .typeBoxs{height:96upx;margin-left: 5%;}
	.content .proList .proRows .type{font-size: 20upx;float: left;margin:5upx;padding:5upx;border-radius: 10upx;color:#DC582A;background:rgb(251,238,233);}
	.content .proList .proRows .priceBox{width: 100%;margin-top: 10upx;margin-left: 5%;}
	.content .proList .proRows .priceBox .price{float:left;font-size: 24upx;color:#262626;margin-right: 5upx;font-weight: bold;font-family: hzgb;}
	.content .proList .proRows .priceBox .priceTip{float: right;margin-left:5upx;font-size: 32upx;color:#262626;margin-right: 5upx;font-weight: bold;font-family: hzgb;position: relative;top:-4upx}
	.content .proList .proRows .priceBox .priceBefore{float:left;color:#999999;font-size: 20upx;}
	.content .proList .proRows .priceBox .user{width:95%;margin-left: 5%;float:right;font-size: 24upx;margin-right: 8%;color:#999999;}
	.content .footer{width: 100%;height: 100upx;position: fixed;left:0;bottom:0;z-index:2;background: white;border-top: 2upx solid rgba(0,0,0,0.2);}
	.content .footer .imageBox{width: 25%;float:left;display: flex;justify-content:space-between;margin-left: 5%;}
	.content .footer .imageBox .icon{width: 40upx;height:40upx;float: left;margin-top:35upx;}
	.content .footer .buyBox{width:30%;margin-right: 2%;height:80upx;margin-top: 10upx;float: right;text-align: center;border-radius: 10upx;}
	.content .footer .bg_blue{background: rgb(40,50,102);}
	.content .footer .bg_orange{background: rgb(220,88,42);}
	.content .footer .buyBox .pingNow{width: 100%;display:flex;justify-content: center;color:white;font-size:30upx}
	.content .footer .buyBox .pingNow .priceIcons_footer{width: auto;float:left;color:white;font-size:30upx}
	.content .footer .buyBox .pingNow .price_footer{width: auto;float:left;}
	.content .footer .buyBox .names{color:white;font-size: 22upx;}
	.content .footer .buyBox .nameSingle{color:white;font-size: 28upx;height:80upx;line-height: 80upx;}
	.content .hideBox{width:100%;height:100%;position: fixed;top:0;left:0;z-index: 3;}
	.content .bg_grey{width:100%;height:100%;position: fixed;top:0;left:0;z-index: 4;background: rgba(0,0,0,0.4);}
	.content .bg_white{width:100%;height:23.5%;position: fixed;bottom:0;left:0;z-index: 5;background:rgb(247,244,248);border-top-left-radius: 20upx;border-top-right-radius: 20upx;padding-bottom: 0;}
	.content .bg_white .iconBox{width:50%;float: left;text-align: center;margin-top:40upx;}
	.content .bg_white .iconBox .icon{width:80upx;height:80upx}
	.content .bg_white .iconBox .iconName{color:#000000}
	.content .bg_white .falses{width: 100%;text-align: center;font-size: 18px;background-color:white;padding:20upx 0;color:#999999}
	.content button::after{border: none}
	.content .ticketBox{width: 100%;height:70vh;position: fixed;bottom: 0;left:0;z-index: 2;background: rgb(245,245,249);}
	.content .ticketGrey{width: 100%;;height:30vh;position: fixed;top: 0;left:0;z-index: 7;background: rgba(0,0,0,0.4)}
	.content .ticketBox .title{font-weight: bold;color:#30313B;font-size: 40upx;text-align: center;margin:20upx 0 40upx 0;}
	.content .ticketBox .ticketScrollBox{width: 100%;height:75%;overflow-y: scroll;}
	.content .ticketBox .ticketList{width:95%;margin-left: 2.5%;margin-bottom: 40upx;border-radius: 10upx;background: white;padding:2.5%;}
	.content .ticketBox .ticketList .priceBoxs{width: 30%;float: left;text-align: center;}
	.content .ticketBox .ticketList .priceBoxs .ticketPrice{height: 132upx;line-height:132upx;font-size: 100upx;color:#DC582A;}
	.content .ticketBox .ticketList .priceBoxs .priceName{font-size: 24upx;color:#DC582A;}
	.content .ticketBox .ticketNameBox{width: 40%;float: left;text-align: left;margin-left: 5%;}
	.content .ticketBox .ticketNameBox .ticketTitle{font-size:36upx;font-weight: bold;color:#262626;margin-top: 20upx;}
	.content .ticketBox .ticketNameBox .ticketUseTime{font-size: 26upx;color:#999999;font-weight: bold;margin:10upx 0 20upx 0}
	.content .ticketBox .ticketNameBox .useWay{font-size: 26upx;color:#BBBBBB;}
	.content .ticketBox .ticketLineCenter{width: 25%;height:164upx;display: flex;align-items: center;}
	.content .ticketBox .getTicketBtn{width: 100%;padding:10upx 0;color:white;border-radius: 200upx;text-align: center;background: rgb(220,88,42);float: right;font-size: 26upx;}
	.content .ticketBox .closeTicket{width: 95%;padding:20upx 0;margin-top:20upx;margin-left:2.5%;background: rgb(220,88,42);color: white;text-align: center;border-radius: 200upx;}
	.content .teamBuyBox{width: 100%;height: 100vh;position: fixed;top:0;left:0;z-index: 8;}
	.content .teamBuyBox .team_grey{width: 100%;height: 100vh;background: rgba(0,0,0,0.4);position: fixed;top:0;left:0;z-index: 8;}
	.content .teamBuyBox .team_white{width: 90%;height:32%;border-radius: 10upx;background:white;position: fixed;top:35%;left:5%;z-index: 8;}
	.content .teamBuyBox .team_white .closeIcon{width: 48upx;height:48upx;position: absolute;top:-20upx;right:-20upx;}
	.content .teamBuyBox .team_white .team_title{width:100%;text-align: center;margin-top: 20upx;font-size: 36upx;color:#30313B;font-weight: bold;}
	.content .teamBuyBox .team_white .team_less{width: 100%;margin:20upx 0 40upx 0;display: flex;justify-content: center;font-size: 28upx;color:#666666;}
	.content .teamBuyBox .team_white .team_less .color_orange{color:#DC582A;margin:0 10upx}
	.content .teamBuyBox .team_white .teamBuyHeadImageBox{width: 25%;margin:0 12.5%;float: left;position: relative;text-align: center;}
	.content .teamBuyBox .team_white .teamBuyHeadImageBox .teamBuyHeadImage{width: 120upx;height: 120upx;border-radius: 120upx;}
	.content .teamBuyBox .team_white .teamBuyHeadImageBox .teamBuyName{padding:4upx 20upx;color:white;border:2upx solid white;background:#DC582A;font-size: 26upx;border-radius: 200upx;position: absolute;top:-20upx;left:-20upx;z-index: 2;}
	.content .teamBuyBox .team_white .addTeamBuy{width: 90%;font-size: 34upx;padding:15upx 0;margin-top: 35upx;margin-left:5%;text-align: center;border-radius:200upx;color:white;background: #DC582A;}
	.content .ruleBox{width: 100%;height:100vh;position: fixed;left:0;bottom: 0;z-index: 3;}
	.content .ruleBox .ruleGrey{width: 100%;height:30vh;background: rgba(0,0,0,0.4);position: fixed;left:0;top: 0;z-index: 3;}
	.content .ruleBox .goodsBox{width: 100%;height:70vh;padding:3% 2.5%;background: white;position: fixed;left:0;bottom: 0;z-index: 3;}
	.content .ruleBox .goodsBox .goodsBoxCloseIcon{width: 28upx;height: 28upx;position: absolute;top:2.5%;right:2.5%;}
	.content .ruleBox .goodsBox .goodsImage{width:240upx;height: 240upx;border-radius: 10upx;float: left;margin-right: 5%;}
	.content .ruleBox .goodsBox .goodsRight{width: 60%;height:240upx;float: left;}
	.content .ruleBox .goodsBox .goodsRight .moneyIcon{color:#DC582A;font-size: 60upx;float: left;margin-top:10upx}
	.content .ruleBox .goodsBox .goodsRight .goodsPrice{color:#DC582A;font-size: 60upx;float: left;margin-top:10upx}
	.content .ruleBox .goodsBox .goodsRight .lessNumber{color:#BBBBBB;font-size: 26upx;float: left;margin-top:10upx}
	.content .ruleBox .goodsBox .goodsRight .ruleName{color:#999999;font-size: 26upx;float: left;margin-top:40upx}
	.content .ruleBox .goodsBox .ruleScroll{width: 100%;height: 45%;margin:20upx 0;overflow-y: scroll;}
	.content .ruleBox .goodsBox .ruleScroll .ruleRows{width: 100%;}
	.content .ruleBox .goodsBox .ruleScroll .ruleRows .ruleTitle{font-weight: bold;margin:20upx 0;font-size: 32upx;color:#000000;}
	.content .ruleBox .goodsBox .ruleScroll .ruleRows .ruleRows_more{width: 20%;padding:10upx 0;text-align: center;float: left;margin:15upx 2.5%;color:#262626;font-size: 26upx;background: rgb(245,245,249);border:2upx solid rgb(245,245,249);border-radius: 10upx}
	.content .ruleBox .goodsBox .ruleScroll .ruleRows .ruleRows_this{background: white;color:#DC582A;border:2upx solid #DC582A;border-radius: 10upx;}
	.content .ruleBox .goodsBox .buyNumberBox{width: 100%;margin-top: 20upx;}
	.content .ruleBox .goodsBox .buyNumberBox .numberNameBox{width: 50%;float: left;}
	.content .ruleBox .goodsBox .buyNumberBox .numberNameBox .numberName{width:auto;height:60upx;line-height: 60upx;font-weight: bold;float: left;font-size: 32upx;color:#000000;}
	.content .ruleBox .goodsBox .buyNumberBox .numberNameBox .numberNames{width:auto;height:60upx;line-height: 60upx;float: left;font-size: 24upx;color:#BBBBBB;}
	.content .ruleBox .goodsBox .buyNumberBox .numberCompute{width: 50%;display: flex;justify-content: center;}
	.content .ruleBox .goodsBox .buyNumberBox .numberCompute .addCompute{width: 60upx;height:60upx;line-height: 60upx;text-align: center;border-radius: 10upx;background:rgb(245,245,249);}
	.content .ruleBox .goodsBox .buyNumberBox .numberCompute .buyNumbers{width: 120upx;height:60upx;line-height: 60upx;text-align: center;}
	.content .ruleBox .goodsBox .sureBuy{width: 95%;margin:30upx 0 0 2.5%;font-size: 36upx;padding:20upx 0;background: #DC582A;color:white;border-radius:100upx;text-align: center;}
	.content .videoBox{width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;position: fixed;top:0;left:0;z-index: 2;background: rgba(0,0,0,0.4)}
	/* .content .videoBox .video_grey{width: 100%;height: 100%;position: fixed;top:0;left:0;z-index: 2;background: rgba(0,0,0,0.4);} */
	.content .videoBox .videos{width: 90%;}
</style>
<script>
	import Share from '@/common/wx_share.js'
	import uniSwiperDot from '@/components/uni-swiper-dot/uni-swiper-dot.vue'
	import AnNoticeBar from '@/components/an-notice-bar/an-notice-bar.vue'
	export default {
		components:{
			uniSwiperDot,
			AnNoticeBar,
		},
		data() {
			return {
				share:{
					title:"",
					path:'/pages_index/pages/details/details',
					imageUrl:'',
					desc:'',
					content:''
				},
				titleType:0,
				bannerList:[
					// {src:"/static/index/banner.png",type:0,video:""},
					// {src:"/static/index/banner.png",type:1,video:"/static/del/video.mp4"},
					// {src:"/static/index/banner.png",type:0,video:""}
				],
				current:0,
				dotsStyles:{
					bottom:0,
					backgroundColor: 'rgba(0,0,0,0.4)',
					border: '1px solid none',
					color: 'none',
					selectedBackgroundColor: 'white',
					selectedBorder: '1px none solid'
				},
				noticeMsg:[
					// {id:1,title:"阿萨德按阿萨德按时阿萨德阿萨德阿萨德按时阿萨德阿萨德时阿萨德阿萨德",headImage:"/static/del/del_1.png"},
					// {id:1,title:"BB",headImage:"/static/del/del_3.png"},
					// {id:1,title:"CC",headImage:"/static/del/icon_10.png"},
				],
				datas:{
					pinId:"",
					goodsId:"",
					videoSrc:"",
					showVideoBox:false,
					price:"",
					userPrice:"",
					beforePrice:"",
					title:"",
					describe:"",
					content:"",
					buyWay:1,
					cate_id:"",
					shop_id:"",
					vip:"",
					time:"",
					timeShow:false,
				},
				goodsData:[
					// {name:"全场包邮"},
					// {name:"7天无理由退货"},
					// {name:"48小时发货"},
					// {name:"全场包邮"},
					// {name:"全场包邮"},
				],
				goDutchNumber:50,
				dutchList:[
					// {headImage:"/static/del/icon_10.png",name:"这是名称1",lessPeople:"2",lessTime:"",timeStamp:"1611308400",show:true,lessNumber:1},
					// {headImage:"/static/del/icon_10.png",name:"这是名称2",lessPeople:"2",lessTime:"",timeStamp:"1611419000",show:true,lessNumber:2},
					// {headImage:"/static/del/icon_10.png",name:"这是名称3",lessPeople:"2",lessTime:"",timeStamp:"1611420000",show:true,lessNumber:3},
					// {headImage:"/static/del/icon_10.png",name:"这是名称4",lessPeople:"22",lessTime:"",timeStamp:"1611453650",show:true,lessNumber:4},
				],
				store:{
					headImage:"",
					name:"",
					type:"",
					sell:"",
					monthSell:"",
					tel:""
				},
				typeScrollWidth:"",
				typeList:[
					// {image:"/static/del/del_3.png",name:"小众设计轻小众设计轻奢包包奢包包 女小ck方包",price:123,},
					// {image:"/static/del/del_3.png",name:"小众设计众设轻k方包",price:2,},
					// {image:"/static/del/del_3.png",name:"小众设计众设众设轻众设k方包",price:3,},
					// {image:"/static/del/del_3.png",name:"小众设众设众设计轻k方包",price:4,},
					// {image:"/static/del/del_3.png",name:"小众设众设众设众计轻k方包",price:5,}
				],
				parameterList:[
					// {left:"平拍",right:"aSFG"},
					// {left:"平拍",right:"aSFG"},
					// {left:"平拍",right:"aSFG"},
					// {left:"平拍",right:"aSFG"},
					// {left:"平拍",right:"aSFG"},
				],
				rowsList:[
					// {cover:"/static/del/del_3.png",title:"描述述描述述描述述描述述描述述描述述",price:"1",priceBefore:"12",use:"123",type:[{name:"旗舰店"},{name:"退货包运费"},{name:"退货包运费"}]},
					// {cover:"/static/del/del_3.png",title:"描述述描述述描述述描述述描述述描述述",price:"1",priceBefore:"12",use:"123",type:[{name:"旗舰店"},{name:"退货包运费"}]},
					// {cover:"/static/del/del_3.png",title:"描述述描述述描述述描述述描述述描述述",price:"1",priceBefore:"12",use:"123",type:[{name:"旗舰店"},{name:"退货包运费"},{name:"退货包运费"}]}
				],
				isCol:false,
				showHideBox:false,
				ticketList:[
					// {price:123,useMoney:0,type:"商品",useTime:"2021.12.30"},
					// {price:12 ,useMoney:0,type:"平台",useTime:"2021.12.30"},
					// {price:  2,useMoney:1,type:"商品",useTime:"2021.12.30"},
					// {price:123,useMoney:1,type:"商品",useTime:"2021.12.30"},
					// {price:12 ,useMoney:1,type:"平台",useTime:"2021.12.30"},
					// {price:2  ,useMoney:1,type:"商品",useTime:"2021.12.30"},
				],
				ticketListSingle:{},
				showTicketList:false,
				showTeamBuy:false,
				teamBuyList:"",
				teamTimer:"",
				showBuyShadow:false,
				buyList:{
					cover:"",
					price:"",
					number:"",
					maxNumber:"",
					buyNumber:1,
					list:[
						// {
						// 	title:"规格标题1",
						// 	rule:[
						// 		{rules:"规格1",isThis:false,id:1},
						// 		{rules:"规格2",isThis:false,id:2},
						// 		{rules:"规格3",isThis:false,id:3},
						// 		{rules:"规格4",isThis:false,id:4},
						// 		{rules:"规格5",isThis:false,id:5},
						// 		{rules:"规格6",isThis:false,id:6},
						// 	]
						// },
						// {
						// 	title:"规格标题2",
						// 	rule:[
						// 		{rules:"规格7",isThis:false,id:7},
						// 		{rules:"规格8",isThis:false,id:8},
						// 	]
						// },
						// {
						// 	title:"规格标题3",
						// 	rule:[
						// 		{rules:"规格9",isThis:false,id:9},
						// 		{rules:"规格10",isThis:false,id:10},
						// 		{rules:"规格11",isThis:false,id:11},
						// 	]
						// },
					]
				},
				attrs:{},
				assem_number:"",
				pages:1,
				
				
			}
		},
		onLoad(e){
			// this.share.path += "?id=" + e.id
			this.share.path = this.share.path+"?id=" + e.id+ "&NewUserId=" + this._$userToken("userInfo").id
			if( e.NewUserId ){
				try {
				    uni.setStorageSync('NewUserId', e.NewUserId);
				}catch(e){}
			}
			this.datas.goodsId = e.goods_id
			this.datas.pinId = e.id
			this.AjaxLoad(e.goods_id,e.id)
		},
		onReachBottom(){
			this.pages++
			this.AjaxLoadMore()
		},
		onPageScroll(e){
			if( e.scrollTop > 50 ){
				this.titleType = 1
			}else{
				this.titleType = 0
			}
		},
		methods: {
			AjaxLoad(e,rush_id){
				uni.showLoading({
					title:"加载中..."
				})
				var that = this;
				var bannerList = [],ticketList = [],goodsData = [],dutchList = [],typeList = [],parameterList = [],rowsList = [],noticeMsg = [],buyList = []
				
				let param={
					goods_id:e,
					rush_id:rush_id,
					token:this._$userToken("userInfo").token,
				};
				this._$InitRequest.request("Goods/goodsinfo", param).then(res => {
					if( res.status == 400 ){
						uni.showToast({icon:"none",title:res.mess})
						setTimeout(function(){
							uni.navigateBack({
								delta:1
							})
						},1500)
					}
					//距离结束剩余时间
					this.computeTimes( res.data.activity_info.end_time )
					//价格标题等
					if( res.data.goodsinfo.is_vip == 1 ){
						this.datas.price = res.data.goodsinfo.vip_shop_price
						this.datas.vip = 1
					}else if( res.data.goodsinfo.is_vip == 0 ){
						this.datas.price = res.data.goodsinfo.shop_price
						this.datas.vip = 0
					}
					this.datas.beforePrice = res.data.goodsinfo.zs_market_price
					this.datas.title = res.data.goodsinfo.goods_name
					this.datas.describe = res.data.goodsinfo.goods_brief
					this.datas.content = res.data.goodsinfo.goods_desc
					this.datas.cate_id = res.data.goodsinfo.cate_id
					this.datas.shop_id = res.data.goodsinfo.shop_id
					//显示购买的
					this.buyList.cover = res.data.goodsinfo.thumb_url
					this.buyList.price = res.data.goodsinfo.zs_shop_price
					this.buyList.number = res.data.goodsinfo.product
					//规格价格
					this.attrs = res.data.attrs
					res.data.radioattr.forEach( (item) =>{
						let rule = []
						item.attr.forEach( (items) =>{
							rule.push({
								id:items.id,
								attr_id:items.attr_id,
								rules:items.attr_value,
								isThis:false
							})
						})
						buyList.push({
							title:item.name,
							rule:rule
						})
					})
					for (var i = 0; i < buyList.length; i++){this.buyList.list.push( buyList[i] )}
					
					//是否收藏
					if( res.data.goodsinfo.coll_goods == 1 ){
						this.isCol = true
					}else if( res.data.goodsinfo.coll_goods == 0 ){
						this.isCol = false
					}
					
					//轮播图
					res.data.gpres.forEach( (item) =>{
						bannerList.push({
							id:item.id,
							src:item.img_url,
							sort:item.sort,
							type:0,
							video:""
						})
					})
					for (var i = 0; i < bannerList.length; i++){this.bannerList.push( bannerList[i] )}
					if( res.data.goodsinfo.video ){
						this.bannerList[0].type = 1
						this.bannerList[0].video = res.data.goodsinfo.video
					}
					
					//优惠券
					res.data.couponinfos.infos.forEach( (item) =>{
						ticketList.push({
							id:item.id,
							type:item.coupon_type,
							price:item.dec_price,
							useMoney:item.man_price,
							useTime:item.end_time,
						})
					})
					for (var i = 0; i < ticketList.length; i++){this.ticketList.push( ticketList[i] )}
					this.ticketListSingle = this.ticketList[0]
					
					
					//包邮
					res.data.sertions.infos.forEach( (item) =>{
						goodsData.push({
							name:item.ser_name
						})
					})
					for (var i = 0; i < goodsData.length; i++){this.goodsData.push( goodsData[i] )}
					
					//拼单
					this.goDutchNumber = res.data.pintuan.total
					res.data.pintuan.list.forEach( (item) =>{
						dutchList.push({
							// headImage:"https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3829390846,1871489455&fm=11&gp=0.jpg",
							assem_number:item.assem_number,
							headImage:item.tz.headimgurl,
							name:item.tz.user_name,
							lessPeople:item.tuan_num,
							lessTime:"",
							timeStamp:item.timeout,
							lessNumber:item.pin_num - item.tuan_num,
							show:true,
						})
					})
					for (var i = 0; i < dutchList.length; i++){this.dutchList.push( dutchList[i] )}
					
					//上面漂浮的
					res.data.pintuan.list.forEach( (item) =>{
						noticeMsg.push({
							title:item.tz.user_name+"发起了拼单",
							headImage:item.tz.headimgurl,
						})
					})
					for (var i = 0; i < noticeMsg.length; i++){this.noticeMsg.push( noticeMsg[i] )}
					
					//店铺
					this.store.headImage = res.data.shopinfos.logo
					this.store.name = res.data.shopinfos.shop_name
					this.store.type = 1
					this.store.sell = res.data.shopinfos.goods_count
					this.store.monthSell = res.data.shopinfos.month_sales_volume
					this.store.id = res.data.shopinfos.id
					this.store.tel = res.data.shopinfos.telephone
					res.data.shopinfos.goods_recommend_list.forEach( (item) =>{
						typeList.push({
							id:item.id,
							image:item.thumb_url,
							name:item.goods_name,
							price:item.shop_price,
						})
					})
					for (var i = 0; i < typeList.length; i++){this.typeList.push( typeList[i] )}
					
					//商品参数
					res.data.uniattr.forEach( (item) =>{
						parameterList.push({
							left:item.attr_name,
							right:item.attr_value,
						})
					})
					for (var i = 0; i < parameterList.length; i++){this.parameterList.push( parameterList[i] )}
					
					//更多商品
					this.AjaxLoadMore()
					
					for (let i = 0; i < this.dutchList.length; i++){
						this.computeTime( this.dutchList[i].timeStamp , i )
					}
					this.typeScrollWidth = this.typeList.length * 110 + "px"
					setTimeout(()=>{
						uni.hideLoading()
					},500)
				},error=>{})
			},
			AjaxLoadMore(){
				var rowsList = []
				let param={
					page:this.pages,
					type:1,
					is_recommend:1,
					cate_id:this.datas.cate_id
				};
				this._$InitRequest.request('Index/getgoodlst', param).then(res => {
					res.data.goodres.forEach( (item) =>{
						rowsList.push({
							id:item.id,
							cover:item.thumb_url,
							title:item.goods_name,
							price:item.min_price,
							priceBefore:item.market_price,
							use:item.pin_sale,
						})
					})
					for (var i = 0; i < rowsList.length; i++){this.rowsList.push( rowsList[i] )}
				},error=>{})
			},
			computeTime(time,index){
				var that = this;
				var dateEnd = new Date();
				var dateDiff = time*1000 - dateEnd.getTime();
				var dayDiff = Math.floor(dateDiff / (24 * 3600 * 1000));
				var leave1=dateDiff%(24*3600*1000)
				var hour=Math.floor(leave1/(3600*1000))
				var leave2=leave1%(3600*1000)
				var minute=Math.floor(leave2/(60*1000))
				var leave3=leave2%(60*1000)
				var second=Math.round(leave3/1000)
				var timer = setInterval(function(){
					second--
					if( second <= 0 ){
						minute -= 1
						second = 59
					}
					if( minute < 0 ){
						hour -= 1
						minute = 59
						second = 60
					}
					if( hour == 0 && minute == 0 && second == 1 ){
						that.dutchList[index].show = false
					}
					that.dutchList[index].lessTime = hour+":"+minute+":"+second
				},1000)
			},
			computeTimes(time){
				var that = this;
				var useTextDay = ""
				var dateEnd = new Date();
				var dateDiff = time*1000 - dateEnd.getTime();
				var dayDiff = Math.floor(dateDiff / (24 * 3600 * 1000));
				var leave1=dateDiff%(24*3600*1000)
				var hour=Math.floor(leave1/(3600*1000))
				var leave2=leave1%(3600*1000)
				var minute=Math.floor(leave2/(60*1000))
				var leave3=leave2%(60*1000)
				var second=Math.round(leave3/1000)
				if( dayDiff > 0 ){
					useTextDay = dayDiff +"天"
				}
				var timer = setInterval(function(){
					second--
					if( second <= 0 ){
						minute -= 1
						second = 59
					}
					if( minute < 0 ){
						hour -= 1
						minute = 59
						second = 60
					}
					that.datas.time = useTextDay + hour+":"+minute+":"+second
					that.datas.timeShow = true
				},1000)
			},
			change(e){this.current = e.detail.current},
			tapBanner(type,videoSrc){if( type == 1 ){this.datas.videoSrc = videoSrc;this.datas.showVideoBox = true}},
			btnCol(){
				if( this.isCol == true ){
					let param={
						// token:"61a37939e67454853f97d91b33bed0279fb36d0d",
						token:this._$userToken("userInfo").token,
						goods_id:this.datas.goodsId
					};
					this._$InitRequest.request('CollGoods/cancelcoll', param).then(res => {
						if( res.status == 200 ){
							this.isCol = false
						}
						uni.showToast({title:res.mess,icon:"none"})
					},error=>{})
				}else{
					let param={
						// token:"61a37939e67454853f97d91b33bed0279fb36d0d",
						token:this._$userToken("userInfo").token,
						goods_id:this.datas.goodsId
					};
					this._$InitRequest.request('CollGoods/coll', param).then(res => {
						if( res.status == 200 ){
							this.isCol = true
						}
						uni.showToast({title:res.mess,icon:"none"})
					},error=>{})
				}
			},
			btnTel(){
				var that = this;
				uni.makePhoneCall({
				    phoneNumber: that.store.tel,
					success: (res) => {
						console.log('成功!')
					},
					fail: (res) => {
						console.log('失败!')
					}
				});
			},
			tapBePoster(){
				// uni.navigateTo({url:"/pages_index/pages/bePoster/bePoster?id=" + 1})
				uni.navigateTo({url:"/pages_index/pages/bePoster/bePoster?id=" + this.datas.goodsId})
			},
			btnBack(){uni.navigateBack({delta:1})},
			getTicketNow(id){
				let param={
					// token:"61a37939e67454853f97d91b33bed0279fb36d0d",
					token:this._$userToken("userInfo").token,
					coupon_id:id
				};
				this._$InitRequest.request('coupon/getcoupons', param).then(res => {
					this.showTicketList = false;
					uni.showToast({title:res.mess,icon:"none"})
				},error=>{})
			},
			btnTeam(e){
				this.assem_number = e.assem_number
				this.teamBuyList = ""
				this.teamBuyList = e;
				this.showTeamBuy = true
				let that = this;
				clearInterval(that.teamTimer)
				let dateEnd = new Date();
				let dateDiff = this.teamBuyList.timeStamp*1000 - dateEnd.getTime();
				let dayDiff = Math.floor(dateDiff / (24 * 3600 * 1000));
				let leave1=dateDiff%(24*3600*1000)
				let hour=Math.floor(leave1/(3600*1000))
				let leave2=leave1%(3600*1000)
				let minute=Math.floor(leave2/(60*1000))
				let leave3=leave2%(60*1000)
				let second=Math.round(leave3/1000)
				that.teamTimer = setInterval(function(){
					second--
					if( second <= 0 ){
						minute -= 1
						second = 59
					}
					if( minute < 0 ){
						hour -= 1
						minute = 59
						second = 60
					}
					if( hour == 0 && minute == 0 && second == 1 ){
						that.teamBuyList.show = false
					}
					that.teamBuyList.lessTime = hour+":"+minute+":"+second
				},1000)
			},
			addShoppingCar(){
				let param={
					// token:"61a37939e67454853f97d91b33bed0279fb36d0d",
					token:this._$userToken("userInfo").token,
					goods_id:this.datas.goodsId,
					num:1,
					source_shop_id:this.store.id
				};
				this._$InitRequest.request('Cart/addcart', param).then(res => {
					uni.showToast({title:"已加入购物车！",icon:"success"})
				},error=>{})
			},
			thisRule(id,index,indexs){
				var chooseList = []
				var chooseListString = ""
				for (var i = 0; i < this.buyList.list[index].rule.length; i++) {
					this.buyList.list[index].rule[i].isThis = false
				}
				this.buyList.list[index].rule[indexs].isThis = true
				for (var i = 0; i < this.buyList.list.length; i++) {
					for(var a = 0;a<this.buyList.list[i].rule.length;a++){
						if( this.buyList.list[i].rule[a].isThis == true ){
							chooseList.push( this.buyList.list[i].rule[a].id )
						}
					}
				}
				chooseListString = chooseList.toString()
				for (var i = 0; i < this.attrs.length; i++) {
					if( this.attrs[i].attr == chooseListString ){
						if( this.datas.buyWay == 3 ){//拼单
							this.buyList.price = this.attrs[i].value.pin_price
						}else if( this.datas.buyWay == 1 ){//立即购买
							this.buyList.price = this.attrs[i].value.attr_price
						}
						this.buyList.number = this.attrs[i].value.product
					}
				}
			},
			computBuyNumber(e){
				if( e == 0 ){
					if( this.buyList.buyNumber == 1 ){
						return
					}else{
						this.buyList.buyNumber --
					}
				}else if( e == 1 ){
					this.buyList.buyNumber ++
				}
			},
			sureBtn(){
				var chooseList = []
				var chooseListString = "",chooseListStringSplit = ""
				// this.showBuyShadow = false
				for (var i = 0; i < this.buyList.list.length; i++) {
					for(var a = 0;a<this.buyList.list[i].rule.length;a++){
						if( this.buyList.list[i].rule[a].isThis == true ){
							chooseList.push( this.buyList.list[i].rule[a].id )
						}
					}
				}
				chooseListString = chooseList.toString()
				chooseListStringSplit = chooseListString.split(",")
				if( this.buyList.list.length == 0 ){
					this.AjaxBuy(chooseListString)
				}else{
					if( chooseListStringSplit.length !== this.buyList.list.length ){
						uni.showToast({title:"请选择规格",icon:"none"})
					}else{
						this.AjaxBuy(chooseListString)
					}
				}
				
			},
			AjaxBuy(e){
				if( this.datas.buyWay == 3 ){//拼团
					let param={
						token:this._$userToken("userInfo").token,
						goods_id:this.datas.goodsId,
						num:this.buyList.buyNumber,
						goods_attr:e,
						pin_number:this.assem_number,
						fangshi:2,
						pinId:this.datas.pinId
					};
					this._$InitRequest.request('order/purbuy', param).then(res => {
						if( this.assem_number ){
							uni.navigateTo({
								url:"/pages_mine/pages/sureOrder/sureOrder?id=" + this.datas.goodsId + "&num=" + this.buyList.buyNumber + "&goods_attr=" + e + "&fangshi=2" + "&assem_number=" + this.assem_number + "&pur_id=" + res.data.pur_id
							})
						}else{
							uni.navigateTo({
								url:"/pages_mine/pages/sureOrder/sureOrder?id=" + this.datas.goodsId + "&num=" + this.buyList.buyNumber + "&goods_attr=" + e + "&fangshi=2" + "&pur_id=" + res.data.pur_id
							})
						}
					},error=>{})
				}else if( this.datas.buyWay == 1 ){
					let param={
						token:this._$userToken("userInfo").token,
						goods_id:this.datas.goodsId,
						num:this.buyList.buyNumber,
						goods_attr:e,
						fangshi:1,
					};
					this._$InitRequest.request('order/purbuy', param).then(res => {
						uni.navigateTo({
							url:"/pages_mine/pages/sureOrder/sureOrder?id=" + this.datas.goodsId + "&num=" + this.buyList.buyNumber + "&goods_attr=" + e + "&fangshi=1" + "&pur_id=" + res.data.pur_id
						})
					},error=>{})
				}else if( this.datas.buyWay == 2 ){//购物车
					let param={
						// token:"61a37939e67454853f97d91b33bed0279fb36d0d",
						token:this._$userToken("userInfo").token,
						goods_id:this.datas.goodsId,
						num:this.buyList.buyNumber ,
						goods_attr:e,
						source_shop_id:this.datas.shop_id,
					};
					this._$InitRequest.request('Cart/addcart', param).then(res => {
						uni.showToast({title:res.mess,icon:"none"})
					},error=>{})
				}
			},
			btnStore(){
				uni.navigateTo({
					url:"/pages_index/pages/store_home/store_home?id=" + this.store.id
				})
			},
			inDetails(e){
				uni.navigateTo({
					url:"/pages_index/pages/details/details?id=" + e
				})
			},
			btnSure(e){
				this.datas.buyWay = e
				this.showBuyShadow = true
				this.showTeamBuy = false
			},
			
			
			
			
			
			
		}
	}
</script>
<style lang="scss" scoped>
/deep/ .uni-input-input {font-size:32upx}
/deep/ .uni-radio-input-checked{background-color:rgb(110,43,34) !important;border:2upx solid white !important}
.content .html{
  ::v-deep {
    img {
      width: 100%;
    }
  }
}
</style>